package com.design.pattern.ChainResponsibility;

import java.util.Objects;

/**
 * @Projectname: Design-pattern
 * @Filename: HandleA
 * @Author: FANSEA
 * @Date:2024/11/7 22:31
 */
public class HandleA extends Handler<String>{

    @Override
    public void handle(String s) {
        if (Objects.equals(s, "A")){
            System.out.println("HandleA");
        }else {
            if (next != null){
                next.handle(s);
            }
        }
    }
}
